
#pragma once

#include <osgViewer/Viewer>
#include <osgGA/GUIEventHandler>
#include <osgGA/GUIEventAdapter>

#include <Interactiv/Command>
#include <Interactiv/Interactiv>

#include <Interactiv/Command>
#include <osg/MatrixTransform>
#include <osg/Projection>

#include <Interactiv_BIM/Interactiv_BIM>
#include <selectTool/Export>


namespace SelectTool_ {

	class  SelectTool_EXPORT RectSelectCommand : public Command
	{
	public:
		RectSelectCommand(Interactiv_Base* bim_Interactiv, int type);
		~RectSelectCommand();

	public:
		virtual bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa);

		void CommandBegin(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa);
		void CommandEnd(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa);
		void CommandExe(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa);
	private:
		osg::ref_ptr<osg::Geode> geode_          ;
		osg::ref_ptr<osg::Geometry> geometry_    ;
		osg::ref_ptr<osg::Projection> projection_;

		InteractivBIM* bim_Interactiv_            ;
		osg::ref_ptr<osg::MatrixTransform> modeview_;
	};

}

using namespace SelectTool_;
